import Taro from '@tarojs/taro'
import { View, Image, Text } from '@tarojs/components'
import './index.scss'

export default function CashList({ listData = [] }) {
  return (
    <View className='list-container'>

      {
        listData.map((item, index) => (
          <View className='list-item' key={index}>
            {
              item.avatar && (
                <Image className='img' src={item.avatar} />
              )
            }
            <View className='info'>
              <View className='name'>{ item.name }</View>
              <View className='status'>{ item.desc }</View>
            </View>
            <View className='coin'>
              <Text className='text'>{item.num}</Text>
              <Image className='img' src={require('../../assets/coin24X24@2x.png')} />
            </View>
          </View>
        ))
      }
    </View>
  )
}

